| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm'; |
||
| 3 | |||
| 4 | @Entity() |
||
| 5 | export class Leave { |
||
| 6 | @PrimaryGeneratedColumn('uuid') |
||
| 7 | private id: string; |
||
| 8 | |||
| 9 | @Column({type: 'integer', nullable: false}) |
||
| 10 | private time: number; |
||
| 11 | |||
| 12 | @Column({type: 'date', nullable: false}) |
||
| 13 | private date: string; |
||
| 14 | |||
| 15 | @ManyToOne(type => LeaveRequest, { nullable: false }) |
||
| 16 | private leaveRequest: LeaveRequest; |
||
| 17 | |||
| 18 | constructor( |
||
| 19 | leaveRequest: LeaveRequest, |
||
| 20 | time: number, |
||
| 21 | date: string |
||
| 22 | ) { |
||
| 23 | this.leaveRequest = leaveRequest; |
||
| 24 | this.time = time; |
||
| 25 | this.date = date; |
||
| 26 | } |
||
| 27 | |||
| 28 | public getId(): string { |
||
| 29 | return this.id; |
||
| 30 | } |
||
| 31 | |||
| 32 | public getLeaveRequest(): LeaveRequest { |
||
| 33 | return this.leaveRequest; |
||
| 34 | } |
||
| 35 | |||
| 36 | public getTime(): number { |
||
| 37 | return this.time; |
||
| 38 | } |
||
| 39 | |||
| 40 | public getDate(): string { |
||
| 41 | return this.date; |
||
| 42 | } |
||
| 44 |